<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" import="java.util.*,java.text.*"%>
<%@page import="fulbitofacil.util.funciones"%>
<%@ page import="java.util.Calendar,java.util.GregorianCalendar;"%>
<%
	Calendar calendar = Calendar.getInstance();

	funciones f = new funciones();
	int dia = f.nullIntconv(request.getParameter("dia"));
	int mes = f.nullIntconv(request.getParameter("mes"));
	int anio = f.nullIntconv(request.getParameter("anio"));	
				
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Detalle</title>
<script type="text/javascript" src="/js/script.js"></script>
<link href="Css/style2.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function mandar() {
	document.frmDetalleDia.action="DetalleDiaServlet"; 
	document.frmDetalleDia.submit(); 
	window.close();
}
</script>
</head>
<body>
	<form name="frmDetalleDia" id="frmDetalleDia" action="DetalleDiaServlet" method="post">
		<input type="hidden" id="txtfecha" name="txtfecha" value="<%=dia+"-"+mes+"-"+anio%>">
		
		<table cellpadding="5" align="center">
			<tr>
				<td colspan="3" align="center">HORARIO DE ATENCION</td>
			</tr>
			<tr>
				<td>
					<table border='1' align="center" class="tabla">
						<tr align='center'>
							<td class="title1" width="100">Hora</td>
							<td class="title1"><input type="checkbox"
								name="chkSeleccionar"></td>
							<td class="title1">Tarifa</td>
						</tr>
						<%
							int j;
							for (int i = 0; i < 12; i++) {
								j=i+1;
								String horaF, horaI;
								int I, F;
								I = i;
								F = i + 1;
								if (I < 10) {
									horaI = "0" + I;
								} else {
									horaI = I + "";
								}
								if (F < 10) {
									horaF = "0" + F;
								} else {
									horaF = F + "";
								}
						%>
						<tr align='center' onmouseover="this.style.background = '#EEE8AD'" onmouseout="this.style.background = '#fff'">
							<td>
								<%
									out.print(horaI + ":00 - " + horaF + ":00");
								%>
							</td>
							<td><input type="checkbox" name="chkSeleccionar_<%=j%>"></td>
							<td><input type="text" name="txtTarifa_<%=j%>" id="txtTarifa_<%=j%>" size="5"></td>
						</tr>
						<%
							}
						%>
					</table>
				</td>
				<td width="30"></td>
				<td>
					<table border='1' align="center" class="tabla">
						<tr align='center'>
							<td class="title1" width="100">Hora</td>
							<td class="title1"><input type="checkbox"
								name="chkSeleccionar"></td>
							<td class="title1">Tarifa</td>
						</tr>
						<%
							for (int i = 12; i < 24; i++) {
								String horaF, horaI;
								int I, F;
								I = i;
								F = i + 1;
								if (I < 10) {
									horaI = "0" + I;
								} else {
									horaI = I + "";
								}
								if (F < 10) {
									horaF = "0" + F;
								} else {
									horaF = F + "";
								}
						%>
						<tr align='center' onmouseover="this.style.background = '#EEE8AD'"
							onmouseout="this.style.background = '#fff'">
							<td>
								<%
									out.print(horaI + ":00 - " + horaF + ":00");
								%>
							</td>
							<%-- 			<td><%=i %></td> --%>
							<td><input type="checkbox" name="chkSeleccionar"></td>
							<td><input type="text" name="txtTarifa" id="txtTarifa"
								size="5"></td>
						</tr>
						<%
							}
						%>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="3" align="center">
<!-- 					<input type="button" value="Guardar Horario" class="boton"  onclick="mandar()"> -->
					<input type="submit" value="Guardar Horario" class="boton">
				</td>
			</tr>
		</table>
	</form>

</body>
</html>